Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>History (Unix)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/History_(Unix)"> <link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-History_Unix rootpage-History_Unix skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">history (Unix)</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr">
<p class="mw-empty-elt">
</p>
<div class="infobox_v3 infobox infobox--frwiki noarchive" style="width:260px">
<div class="entete icon informatique" style="color: #000000;"><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}


/* end https://fr.wikipedia.org/ */
</style>
<div>History</div>
</div>
<p class="mw-empty-elt">


</p>
<table><caption style="color:#000000;">Informations</caption>






































<tbody><tr>
<th scope="row"> Type
</th>
<td>
<span class="wd_p31"><a href="Commandes_Unix" title="Commandes Unix">Liste de commandes Unix</a><br><a href="Commande_informatique" title="Commande informatique">Commande informatique</a></span></td>
</tr>









</tbody></table>
<p class="mw-empty-elt">

</p>
</div>
<p><b>history</b> est une commande <a href="UNIX" class="mw-redirect" title="UNIX">UNIX</a> qui affiche les dernières <a href="Commande_informatique" title="Commande informatique">commandes</a> entrées par le compte utilisateur courant, par ordre chronologique.
</p><p>Par défaut elle affiche les 500 dernières commandes, mais son paramètre permet de préciser le nombre.
</p>
<div class="mw-heading mw-heading2"><h2 id="Exemples">Exemples</h2></div>
<div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span>$<span class="w"> </span><span class="nb">history</span>
<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="nb">pwd</span>
<span class="w"> </span><span class="m">2</span><span class="w"> </span>ls
<span class="w"> </span><span class="m">3</span><span class="w"> </span>touch<span class="w"> </span><span class="nb">test</span>
<span class="w"> </span><span class="m">4</span><span class="w"> </span>rm<span class="w"> </span><span class="nb">test</span>
<span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="nb">history</span>
$<span class="w"> </span><span class="nb">history</span><span class="w"> </span><span class="m">2</span>
<span class="w"> </span><span class="m">4</span><span class="w"> </span>rm<span class="w"> </span><span class="nb">test</span>
<span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="nb">history</span>
$
</pre></div>
<p>Si la liste est trop longue pour être lue dans la console, on peut&nbsp;:
</p>
<ol><li>La faire défiler manuellement&nbsp;: <i>history | more</i>.</li>
<li>La filtrer&nbsp;: <i>history | grep -i MotCherché</i>.</li></ol>
<div class="navbox-container" style="clear:both;">

</div>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de l’informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2025-09-13" href="https://fr.wikipedia.org/wiki/?title=History_(Unix)&amp;oldid=228927854">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>